#include "stdafx.h"


string MixFeeds2URL(char* xfeeds, char* url)
{
	string ret;
	for (unsigned int n = 0; n < feeds().size(); n++)
	{
		DEBUG_LINE cout << "Compare Feeds:" << feeds().at(n).name <<" and "<<xfeeds<< endl;
		if (!strcmp(feeds().at(n).name, xfeeds))
		{
			ret = feeds().at(n).url;
			ret += url;
			return  ret;
		}
	}
	cout << "Warring:Feeds not fond! " << xfeeds << endl;
	return "undefine";
}

vector<Feeds> _feeds;
vector<Project> _project;
_KERNEL_SPACE  __KERNEL_SPACE;

vector<Feeds>& feeds()
{
	return _feeds;
}

vector<Project> &project()
{
	return _project;
}

_KERNEL_SPACE &KERNEL_SPACE()
{
	return __KERNEL_SPACE;
}


int cmd(string command)
{
	string exec = "cmd.exe /C \" " + command + "\"";
	DEBUG_LINE cout << "Exec Command:" << exec << endl;
	return system(exec.data());
}